import request from '@/utils/request'

const prevUrl = '/system/menu/';

export default {
  // 查询列表
  list(query) {
    return request({
      url: `${prevUrl}list`,
      method: 'get',
      data: query
    })
  },
}

// 获取路由
export const getRouters = () => {
  return request({
    url: '/getRouters',
    method: 'get'
  })
}

export const recordMenu = (menu) => {

  return request({
    url: 'index/recordMenu',
    method: 'post',
    data: menu
  });
}

// 获取菜单的访问记录
export const getMenuRecord = () => {

  return request({
    url: 'system/menu/listCommonMenu'
  });
}